package com.tanhua.dubbo.api.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.tanhua.domain.db.QuestionOption;

import com.tanhua.dubbo.api.QuestionOptionApi;
import com.tanhua.dubbo.mapper.QuestionOptionMapper;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

@Service
public class QuestionOptionApiImpl implements QuestionOptionApi {
    @Autowired
    private QuestionOptionMapper optionMapper;
    @Override
    public void updateById(QuestionOption option) {
        optionMapper.updateById(option);
    }

    @Override
    public QuestionOption selectById(int id) {
        QuestionOption option = optionMapper.selectById(id);
        return option;
    }

    @Override
    public QuestionOption selectOne(String id) {
        QueryWrapper queryWrapper=new QueryWrapper();
        queryWrapper.eq("id",id);
        QuestionOption questionOption = optionMapper.selectOne(queryWrapper);
        return questionOption;
    }

    @Override
    public void deleteById(String id) {
        optionMapper.deleteById(id);
    }

    @Override
    public void insert(QuestionOption option1) {
        optionMapper.insert(option1);
    }
}
